cmake_minimum_required(VERSION 3.12)
project(raytracing)

set(CMAKE_CXX_STANDARD 14)


set(CMAKE_C_COMPILER "g++-7")
set(CMAKE_CXX_COMPILER "g++-7")


find_package(GLUT)
find_package(OpenGL)
find_package(GLEW REQUIRED)

if (GLEW_FOUND)
    include_directories(${GLEW_INCLUDE_DIRS})
    link_libraries(${GLEW_LIBRARIES})
endif()

include_directories("/usr/include/eigen3")
find_package(glfw3 REQUIRED)




add_executable(rrrfuck test_ray_tracing_rander.cpp
        cpuTracer.cpp
        GLrender.cpp
        ShaderSource.cpp)
target_link_libraries(rrrfuck pthread ${GLFW_LIBRARIES})
target_link_libraries(rrrfuck glog)
target_link_libraries(rrrfuck ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${GLUT_LIBRARY})
target_link_libraries(rrrfuck stdc++)
target_link_libraries(rrrfuck  SDL2 GL SOIL)
target_link_libraries(rrrfuck  glfw)

